using SqlSugar;
using System;
using B.S.XZYData.Domain.BaseEntities;

namespace B.S.XZYData.Domain.ZSHH
{
    /// <summary>
    /// 装配工单表
    /// </summary>
    [SugarTable("assembly_work_order")]
    public class AssemblyWorkOrder : BaseModel
    {
        /// <summary>
        /// 单据编号(唯一)
        /// </summary>
        [SugarColumn(Length = 50, IsNullable = false)]
        public string DocumentNumber { get; set; }

        /// <summary>
        /// 工单数
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int? WorkOrderCount { get; set; } = 0;

        /// <summary>
        /// 已结束工单数
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int? CompletedWorkOrderCount { get; set; } = 0;

        /// <summary>
        /// 单据进度(%)
        /// </summary>
        [SugarColumn(DecimalDigits = 2, IsNullable = true)]
        public decimal? DocumentProgress { get; set; } = 0.00m;

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Remarks { get; set; }

        /// <summary>
        /// 重写基类的Updator字段，确保新增时可以为空
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public override string? Updator { get; set; }

        /// <summary>
        /// 重写基类的UpdatorDate字段，确保新增时可以为空
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public override DateTime? UpdatorDate { get; set; }
    }
} 